package com.pangsir.bookstore.controller;

import com.pangsir.bookstore.pojo.Book;
import com.pangsir.bookstore.service.BookService;

import javax.servlet.http.HttpSession;

import java.util.List;

public class BookController {
    private BookService bookService;

    public String index(HttpSession session){
        //获取所有的图书信息，存入session
        List<Book> bookList = bookService.getAllBookList();
        session.setAttribute("bookList",bookList);
        return "index";
    }
}
